<%-- 
    Document   : index
    Created on : 03-may-2012, 19:35:12
    Author     : Administrador
--%>

<%@page import="java.util.Date"%>
<%@page import="WS.WSLab"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>        
        <%
            long i = new Date().getTime();
            WSLab w = new WSLab();
            String hl7 = "MSH|^~\\&|GEOSALUD_CAMEC|CAMEC|LAB|LAB|20110912140000||OML^021|123456|P|2.5|||"
                    + "PID|||18936831^^^2.16.840.1.113883.2.14.1.2.1.2||LOPEZ&PEREZ^JOSE&JUAN||19731006|M||||||||"
                    + "PV1||A|SECTOR&SUBSECTOR^PISO^LUGAR^^^PRESTADOR^SUCURSAL||||2.16.840.1.113883.2.14.1.2.1.3^4575^HOUSE^GREGORY|"
                    + "ORC|NW|32;1256;5|||||||20060922155300||||||||||||034"
                    + "OBR|1|32;1256;5||24361-8^HEMOGRAMA^2.16.840.1.113883.6.1||20060922155300";

            int a = hl7.split("\\|").length;
            /*
             * "MSH|^~\\&|GEOSALUD_CAMEC|CAMEC|LAB|LAB|20110912140000||OML^021|123455|P|2.5|||"
             * +
             * "PID|||18936831^^^2.16.840.1.113883.2.14.1.2.1.2||LOPEZ&PEREZ^JOSE&JUAN||19731006|M||||||||"
             * +
             * "PV1||A|SECTOR&SUBSECTOR^PISO^LUGAR^^^PRESTADOR^SUCURSAL||||2.16.840.1.113883.2.14.1.2.1.3^4575^HOUSE^GREGORY|"
             * + "ORC|NW|32;1256;5|||||||20060922155300||||||||||||034" +
             * "OBR|1|32;1256;5||24361-8^HEMOGRAMA^2.16.840.1.113883.6.1||20060922155300";
             */ //String s = w.OrdenLaboratorio("PRUEBA|OBR|1|asd");
%>
        <h1><%out.print(w.Execute(hl7));%></h1>
        <h1><%out.print(a);%></h1>
    </body>
</html>
